<template>
  <div class="bigbox">
      <div class="content_content1_hang_cell" v-for="(item,index) in list" :key="index">
          <div @click="skip(item)">
        <div><img :src="item.coverFileUrl"></div>
        <div>{{item.courseTitle}}</div>
        <div class="detail">共{{item.subSectionNum}}节课|{{item.participationsCount}}人报名</div>
        <div class="free">免费</div>
          </div>
     </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            list:[]
        }
    },
    created(){
        const url=new URLSearchParams()
        url.append("type","free")
        url.append("pageNum",1)
        url.append("pageSize",10)
        this.$axios.post("http://59.111.104.104:8086/weChat/applet/course/list/type",url).then(res=>{
            // console.log(res)
            this.list=res.data.rows
        });
    },
        methods:{
            skip(item){

                this.$router.push({
                    path:`/detail/${item.courseId}`,

                })
            }
        }

}
</script>

<style lang='less' scoped>
.bigbox{
    display: flex;
    justify-content: space-around;
    flex-wrap:wrap
}
.content_content1_hang_cell{
    margin-top: 10px;
    width: 20%;
    box-sizing: border-box;
    padding: 5px;
    text-align: left;
    img{
        width: 100%;
    }
}

.detail{
    color: #888;
}
.free{
    color: #00CF8C;
    font-size: 16px;
}
</style>